Skip to content

efi/secureboot.go: automatically detect deployedmode variable measurement#546

Closed
valentindavid wants to merge 1 commit intocanonical:masterfrom
valentindavid:valentindavid/automatic-user-mode
Closed

efi/secureboot.go: automatically detect deployedmode variable measurement#546
valentindavid wants to merge 1 commit intocanonical:masterfrom
valentindavid:valentindavid/automatic-user-mode

Conversation

@valentindavid
Copy link
Copy Markdown
Member

e25b821 (#508) regressed the fix from 1e93244 (#497). We need to read the event log for Ubuntu Core systems because we do not use the pre-install checks. So here we instead provide a
WithAutoAllowSecureBootUserMode() that can be called unconditionally on Core system and let the profile be calculated depdending what is in the event log.

…ment

e25b821 (canonical#508) regressed the fix from
1e93244 (canonical#497). We need to read the
event log for Ubuntu Core systems because we do not use the
pre-install checks. So here we instead provide a
`WithAutoAllowSecureBootUserMode()` that can be called unconditionally
on Core system and let the profile be calculated depdending what is in
the event log.
@valentindavid valentindavid requested a review from pedronis April 30, 2026 09:07
Copy link
Copy Markdown
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of questions

Comment thread efi/fw_load_handler.go
switch {
case e.PCRIndex == internal_efi.SecureBootPolicyPCR && e.EventType == tcglog.EventTypeEFIVariableDriverConfig:
if data, ok := e.Data.(*tcglog.EFIVariableData); ok {
if data.VariableName == efi.GlobalVariable && data.UnicodeName == "AuditMode" {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's enough to check one of the two vars?

Comment thread efi/secureboot.go
func (o autoAllowSecureBootUserModeOption) ApplyOptionTo(visitor internal_efi.PCRProfileOptionVisitor) error {
visitor.AddImageLoadParams(func(params ...loadParams) []loadParams {
var out []loadParams
for _, v := range []bool{false, true} {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to set both to true and false, in case the firmware behavior changes?

@valentindavid
Copy link
Copy Markdown
Member Author

We might not need it. We still have a branch where the option is false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants